import {lazy,Suspense} from "react"
import {Route,Redirect,Switch} from "react-router-dom"
import Loading from "@/components/Loading"

const UserControl = lazy(()=>import('@/views/main/UserControl'))
const Video =lazy(()=>import('@/views/video/Video'))
const Upload =lazy(()=>import('@/views/upload/Upload'))
const Routes =()=>{
    return <Suspense fallback={<Loading />} >
            <Switch>
            <Route path="/home/usercontrol" component={UserControl}></Route>
            <Route path="/home/video" component={Video}></Route>
            <Route path="/home/upload" component={Upload}></Route>
            </Switch>
        </Suspense>
}
export default Routes